[Slack Alert] Facebook Ads UTM Check

Use this automation to check that the correct UTM parameters are used for all of your active Facebook ads. For any ad that doesn’t follow your best practices, you will receive a Slack notification.

This automation is for you if you are looking for a way to check if your URLs are following a specific pattern. Get a Slack message for any ads that don’t follow your UTM tracking structure.

Notion image

JSON Recipe

Import the automation recipe(s) into your own account. Don’t know how? Learn here.

Facebook UTM Check
{"name":"Facebook UTM check","description":"fb_utm_check_20220325","nodes":{"fb_select_ad_ids_v2_1":{"type":"fb_select_ad_ids_v2","logging_enabled":false,"x":344,"y":701,"group":"group_1","inputs":{"ad_ids":{"export_enabled":true,"data":[]}}},"calculate_set_operation_1":{"type":"calculate_set_operation","logging_enabled":false,"x":1014,"y":372,"group":"group_1","inputs":{"operator":{"export_enabled":true,"data":"-"}}},"patch_json_list_v2_1":{"type":"patch_json_list_v2","logging_enabled":false,"x":656,"y":546,"group":"group_1","inputs":{"patches":{"export_enabled":true,"data":[{"op":"remove","path":"/context/ui"}]},"value":{"export_enabled":true}}},"build_pattern_v2_1":{"type":"build_pattern_v2","logging_enabled":false,"x":234,"y":263,"group":"group_2","inputs":{"patterns":{"export_enabled":true,"data":[{"description":"UTM Source","regex":"utm_source=facebook"},{"description":"UTM Campaign","regex":"utm_campaign={{campaign.name}}"}]}}},"filter_v2_1":{"type":"filter_v2","logging_enabled":false,"x":1125,"y":428,"group":"group_2","inputs":{"filters":{"export_enabled":true,"data":[{"value":false,"pointer":"/valid","operator":"="}]}}},"filter_v2_2":{"type":"filter_v2","logging_enabled":false,"x":1639,"y":492,"group":"group_1","inputs":{"filters":{"export_enabled":true,"data":[{"value":"itunes.apple.com","pointer":"/url","operator":"not_contains"},{"value":"play.google.com","pointer":"/url","operator":"not_contains"}]}}},"delay_1":{"type":"delay","logging_enabled":false,"x":182,"y":419,"inputs":{"duration":{"export_enabled":true,"data":43200}}},"slack_select_conversation_id_1":{"type":"slack_select_conversation_id","logging_enabled":false,"x":317,"y":272,"group":"group_3","inputs":{"conversation_id":{"title":"conversation_id","description":"Select a Slack Channel or Conversation"}}},"slack_notifier_v2_1":{"type":"slack_notifier_v2","logging_enabled":false,"x":660,"y":447,"group":"group_3","inputs":{"blocks":{"export_enabled":true,"data":[{"type":"section","text":{"type":"mrkdwn","text":"⚠️ At least one ad has incorrect URL parameters."}}]},"thread_ts":{"export_enabled":true}}},"slack_notifier_v2_2":{"type":"slack_notifier_v2","logging_enabled":false,"x":1727,"y":412,"group":"group_3"},"if_v2_1":{"type":"if_v2","logging_enabled":false,"x":1182,"y":395,"inputs":{"b":{"export_enabled":true,"data":[]},"condition":{"export_enabled":true,"data":"not_equal"}}},"for_each_v2_1":{"type":"for_each_v2","logging_enabled":false,"x":1002,"y":353,"group":"group_3"},"patch_json_v2_1":{"type":"patch_json_v2","logging_enabled":false,"x":1332,"y":432,"group":"group_3","inputs":{"patches":{"export_enabled":true,"data":[{"op":"replace","path":"/0/text/text","value":"Expected `{{input.value/pattern/regex}}` for _{{input.value/pattern/description}}_ but got `{{input.value/url/url}}`."},{"op":"replace","path":"/1/elements/0/url","value":"https://business.facebook.com/adsmanager/manage/ads?act={{input.value/url/id/context/ad_account_id/id}}\u0026filter_set=SEARCH_BY_ADGROUP_IDS-STRING_SET%1EANY%1E[%22{{input.value/url/id/id}}%22]"}]},"data":{"export_enabled":true,"data":[{"type":"section","text":{"type":"mrkdwn","text":""}},{"type":"actions","elements":[{"type":"button","text":{"type":"plain_text","text":"Open in Ads Manager"},"url":""}]}]}}},"fb_select_ad_account_ids_v2_1":{"type":"fb_select_ad_account_ids_v2","logging_enabled":false,"x":56,"y":335,"group":"group_1","inputs":{"ad_account_ids":{"title":"ad_account_ids","description":"Select one or more Facebook Accounts"}}},"fb_extract_ad_urls_v2_1":{"type":"fb_extract_ad_urls_v2","logging_enabled":false,"x":1319,"y":456,"group":"group_1"},"match_url_patterns_v2_1":{"type":"match_url_patterns_v2","logging_enabled":false,"x":617,"y":366,"group":"group_2","outputs":{"matched":{"title":"matched","description":"Triggered when matched"}}},"stop_1":{"type":"stop","logging_enabled":false,"x":21,"y":568,"inputs":{"stop":{"export_enabled":true}}},"start_1":{"type":"start","logging_enabled":false,"x":23,"y":473},"fb_fetch_ad_ids_v2_1":{"type":"fb_fetch_ad_ids_v2","logging_enabled":false,"x":400,"y":246,"group":"group_1","inputs":{"effective_status":{"export_enabled":true,"data":["ACTIVE"]}}}},"edges":["fb_select_ad_ids_v2_1.ad_ids:patch_json_list_v2_1.data_list","patch_json_list_v2_1.data_list:calculate_set_operation_1.b","fb_fetch_ad_ids_v2_1.ad_ids:calculate_set_operation_1.a","calculate_set_operation_1.calculated:fb_extract_ad_urls_v2_1.extract","fb_fetch_ad_ids_v2_1.fetched:patch_json_list_v2_1.patch","calculate_set_operation_1.data:fb_extract_ad_urls_v2_1.ad_ids","start_1.start:delay_1.start","delay_1.delayed:fb_fetch_ad_ids_v2_1.fetch","patch_json_list_v2_1.patched:calculate_set_operation_1.calculate","fb_extract_ad_urls_v2_1.urls:filter_v2_2.items","fb_extract_ad_urls_v2_1.extracted:filter_v2_2.filter","filter_v2_2.items:match_url_patterns_v2_1.urls","filter_v2_2.filtered:match_url_patterns_v2_1.match","build_pattern_v2_1.patterns:match_url_patterns_v2_1.patterns","match_url_patterns_v2_1.results:filter_v2_1.items","fb_select_ad_account_ids_v2_1.ad_account_ids:fb_select_ad_ids_v2_1.ad_account_ids","slack_notifier_v2_1.thread_ts:slack_notifier_v2_2.thread_ts","slack_select_conversation_id_1.conversation_id:slack_notifier_v2_2.conversation_id","slack_select_conversation_id_1.conversation_id:slack_notifier_v2_1.conversation_id","match_url_patterns_v2_1.matched:filter_v2_1.filter","if_v2_1.false:delay_1.start","filter_v2_1.filtered:if_v2_1.evaluate","slack_notifier_v2_1.sent:for_each_v2_1.start","patch_json_v2_1.data:slack_notifier_v2_2.blocks","for_each_v2_1.item:patch_json_v2_1.value","filter_v2_1.items:for_each_v2_1.items","filter_v2_1.items:if_v2_1.a","if_v2_1.true:slack_notifier_v2_1.send","patch_json_v2_1.patched:slack_notifier_v2_2.send","for_each_v2_1.do:patch_json_v2_1.patch","slack_notifier_v2_2.sent:for_each_v2_1.next","for_each_v2_1.done:delay_1.start","fb_select_ad_account_ids_v2_1.ad_account_ids:fb_fetch_ad_ids_v2_1.ad_account_ids"],"groups":{"group_2":{"title":"Check UTMs","description":"","x":777,"y":466,"inputs":["match_url_patterns_v2_1.match","match_url_patterns_v2_1.urls"],"outputs":["filter_v2_1.items","filter_v2_1.filtered"]},"group_1":{"title":"Get URLs","description":"","x":455,"y":466,"inputs":["fb_fetch_ad_ids_v2_1.fetch"],"outputs":["filter_v2_2.items","filter_v2_2.filtered"]},"group_3":{"title":"Send Slack Message","description":"","x":1501,"y":432,"inputs":["for_each_v2_1.items","slack_notifier_v2_1.send"],"outputs":["for_each_v2_1.done"]}},"widgets":{"widget_1":{"title":"Blacklisted Ads","description":"We won't be checking these ads.","position":1,"input":"fb_select_ad_ids_v2_1.ad_ids"},"widget_2":{"title":"URL Parameters","description":"Add any URL parameter that you want to check against.","position":3,"icon":"","input":"build_pattern_v2_1.patterns"},"widget_3":{"title":"Run every","description":"The duration to delay the trigger (in Seconds)","position":5,"icon":"las la-hourglass","input":"delay_1.duration"},"widget_4":{"title":"Slack Channel","description":"Select a Slack Channel or Conversation","position":3,"input":"slack_select_conversation_id_1.conversation_id"},"widget_5":{"title":"Facebook Ad Account","description":"Select Facebook Ad Account","position":0,"input":"fb_select_ad_account_ids_v2_1.ad_account_ids"}},"config":{"capture_inputs_enabled":false,"caching_enabled":false},"tags":[]}

How To

After creating the automation, make a few selections and then hit “Run Automation”. The check will then take place on the specified weekday(s) at the specified time.

💡
Per default, all active ads in an account will be checked. If you want to be more specific in the campaign, ad set, or ad selection you can add filters to the automation following this Builder tutorial.

Step 1

Select an Ad Account

Notion image

Step 2

Select a Slack Channel, in which you would like to receive the notifications

Notion image

Step 3

Define how often you want the automation to run

Notion image

Step 4

Additionally, you can blacklist any ads for which you don’t want to run your check. This can be useful if you have a separate team using the same account, for example for boosting Social Media posts that may not follow your other conventions.

Notion image

Step 5

Create a pattern for your UTM.

Notion image
 
Did this answer your question?
😞
😐
🤩

Last updated on December 27, 2022